﻿function ResizeWindowTo(sElemId) {
    document.body.leftMargin = 0;
    document.body.topMargin = 0;
    var oElem = document.getElementById(sElemId);
    var nHigh = oElem.offsetHeight;
    var nWide = oElem.offsetWidth;
    document.body.style.height = nHigh;
    document.body.style.width = nWide;
}